package com.yss.proxy;

/**
 * @author yangsongsong
 * @Description:juti 设计模式-代理模式：实现Image接口的实体类
 * @Company: YSS
 * @date 2019/1/21:23:08
 */
public class RealImage implements Image {

    private String fileName;

    public RealImage(String fileName){
        this.fileName = fileName;
        loadFormatDisk(fileName);
    }

    /**
     * LoadFormat
     * @param fileName
     */
    private void loadFormatDisk(String fileName) {
        System.out.println("Loading " + fileName);
    }

    @Override
    public void display() {
        System.out.println("Displaying " + fileName);
    }
}
